package com.shanzmoo.admin.web.product;


import com.shanzmoo.base.bean.PageRespBase;
import com.shanzmoo.base.bean.SHttpResponse;
import com.shanzmoo.base.bean.SResponse;
import com.shanzmoo.db.product.entity.vo.SkuQueryVO;
import com.shanzmoo.db.product.entity.vo.SkuResultVO;
import com.shanzmoo.db.product.service.IProductSkuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 商品sku 前端控制器
 * </p>
 *
 * @author Xueqz
 * @since 2020-12-09
 */
@Api(tags = "商品-商品spu")
@RestController
@RequestMapping("/api/product/sku")
public class ProductSkuController {

    @Autowired
    private IProductSkuService productSkuService;

    @ApiOperation(value = "获取sku信息")
    @GetMapping("/getSkuList")
    public SHttpResponse<PageRespBase<SkuResultVO>> getSkuList(SkuQueryVO skuQueryVO) {//@Valid @RequestBody
        SResponse<PageRespBase<SkuResultVO>> re = productSkuService.getSkuList(skuQueryVO);
        return SHttpResponse.transform(re);
    }

}
